home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TOS Silver 2000
/
TOS Silver 2000.iso
/
Anwendun
/
IGING
/
IGINGMUL.LST
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
NeXTSTEP
RISC OS/Acorn
UTF-8
Wrap
File List
|
2000-05-01
|
32.7 KB
|
1,505 lines
REM IGINGMUL 3.3.2 GFA 3.6 1.5.0 ogg
REM
REM DAS ELEKTRONISCHE I GING
REM (C) Copyleft 1/0,5/0 Zwyrd
REM
REM This program is free software; you can redistribute it and/or
REM modify it under the terms of the GNU General Public License
REM as published by the Free Software Foundation; either version 2
REM of the License, or (at your option) any later version.
REM This program is distributed in the hope that it will be useful,
REM but WITHOUT ANY WARRANTY; without even the implied warranty of
REM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
REM GNU General Public License for more details.
REM You should have received a copy of the GNU General Public License
REM along with this program; if not, write to the Free Software
REM Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
REM Read READ_ME.TXT and I_GINGTT.TXT for information about the Programm
REM and GPL.TXT and GPL_DE.TXT for information about the GPL.
'
$m44006 !compileroption programmspeicher
basep$=SPACE$(128)
BMOVE BASEPAGE+128,V:basep$,128 !EVENTUELLE PARAMETER SICHERN
'
DEFWRD "a-z" !ALLE VARIABLEN OHNE POSTFIX 2BYTE INTEGER
' !ALLE EINBUCHSTABIGEN WERTE-VARIABLEN SIND LOKAL
ap_id=APPL_INIT()
igg$=" I Ging"
IF @t<>0 !wenn multitasking
~MENU_REGISTER(ap_id,igg$) !dann anmelden
~SHEL_WRITE(9,1,0,CHR$(0),CHR$(0))
ENDIF
INTIN(0)=1 !FARBTIEFE ABFRAGEN
VDISYS 102,1,0
bitpl=INTOUT(4)
scr_br=WORK_OUT(0) !BILDSCHIRMGRÖßE
scr_ho=WORK_OUT(1)
'
IF @c<>0 !wenn compiliert
pfad$=CHR$(GEMDOS(25)+65)+":"+DIR$(0)+"\" !dann pfad feststellen
ELSE
RESERVE (44006)
pfad$="E:\KAOS\IGING\" !im Editor hier eigenen Pfad
ENDIF
'
IF XBIOS(44,-1)=44 OR GEMDOS(68,L:-1,1)<0 !ST/STE
a_st=1
ENDIF
IF @fre<150000
~FORM_ALERT(1,"[3][NICHT GENUG|SPEICHER|NO MEMORY][ OK ]")
END
ENDIF
j$=pfad$+"IGINGSTR.DAT"
IF EXIST(j$)=0
~FORM_ALERT(1,"[2][ IGINGSTR.DAT? ][ GRUMPH ]")
END
ENDIF
h$=SPACE$(2300)
oget(j$,V:h$)
IF RSRC_LOAD(pfad$+"IGING.RSC")=0
~FORM_ALERT(1,"[2][ IGING.RSC? ][ GRUMPH ]")
END
ENDIF
~RSRC_GADDR(0,0,men_1%) !RESOURCE-ADRESSEN
~RSRC_GADDR(0,1,men_2%)
~RSRC_GADDR(0,2,ver_1%)
~RSRC_GADDR(0,3,ver_2%)
~RSRC_GADDR(0,4,end_1%)
~RSRC_GADDR(0,5,end_2%)
'
DIM wind(9),t(6),a(7),line(14),logli(5),t$(60),r$(60),l$(10),co(15)
' WIND() =FENSTERANGABEN
' T() =INFOSEITEN
' A() =EVENT-BUFFER
' LINE() =IGING-LINIEN
' LOGLI() =IGING-LINIEN
' T$() =AKTUELLER SATZ STRINGS
' R$() =2.SATZ STRINGS
' L$() =TEXTDATEI-NAMEN
' CO() =FARBKANAL-BUFFER
'
qui=0
laden !TEXTE LADEN
IF qui<>0
~FORM_ALERT(1,"[2]["+canc$+"][ GRUMPH ]")
~RSRC_FREE()
CLEAR
END
ENDIF
'
vars !PROGRAMM EINRICHTEN
'
ON ERROR GOSUB f
ON BREAK GOSUB ade
'
f:
main
'
CLEAR
END
'
DEFFN t=INT{ADD({ADD(GB,4)},2)}<>1 !MULTITOS?
DEFFN c=BYTE{ADD(BASEPAGE,256)}<>96 !COMPILIERT?
DEFFN b=scr_br-@offs_x+1 !BILDSCHIRMRAND
DEFFN h=scr_ho-@offs_y+1
DEFFN offs_x=wind(0)+1 !OFFSET ARBEITSBEREICH
DEFFN offs_y=wind(1)+wi_ti
'
' FENSTER-ANGABEN
DATA 0,19,640,440,300,20,5,0,72,72
'
' MISCHFARBEN
DATA 3549,2457,11,176,2816,2992,187
'
t: !KOORDINATEN FÜR MINI-TRIGRAMME
DATA 0,5,10,32,37,64,96,106,42,69,74,101
DATA 42,69,74,101,0,5,10,32,37,64,96,106
'
m: !DIE HEXAGRAMME ALS LOGARITHMEN
DATA 63,4032,2961,1890,2583,378,3906,3024
DATA 567,315,3591,504,189,1071,3780,3528
DATA 2457,1638,3843,1008,1449,1701,2016,3969
DATA 441,1575,1953,2142,2898,1197,2268,3150
DATA 252,3087,1512,3717,693,1323,2772,3402
DATA 1827,945,2079,126,2520,3654,2394,2646
DATA 2205,1134,3465,1764,756,3339,3213,1260
DATA 630,2331,882,2835,819,3276,2709,1386
'
' DIE START-PROZEDUREN
> PROCEDURE laden
w=1
inr(0,1)
inr(1,11)
inr(2,11)
v=INSTR(w,h$,CHR$(13))
logo=MAX(0,MIN(1,VAL(MID$(h$,w,v-w-1))))
w=v+2
v=INSTR(w,h$,CHR$(13))
orakel=MAX(1,MIN(4,VAL(MID$(h$,w,v-w-1))))
w=v+2
v=INSTR(w,h$,CHR$(13))
menlan=MAX(0,MIN(1,VAL(MID$(h$,w,v-w-1))))
w=v+2
v=INSTR(w,h$,CHR$(13))
back=MAX(0,MIN(1,VAL(MID$(h$,w,v-w-1))))
IF INSTR(basep$,"-tao")>0 OR INSTR(basep$,"-TAO")>0
autao=1
ENDIF
IF INSTR(basep$,"-ig")>0 OR INSTR(basep$,"-IG")>0
auigg=1
ENDIF
IF INSTR(basep$,"-ex")>0 OR INSTR(basep$,"-EX")>0
IF autao=1
autao_ex=1
ELSE IF auigg=1
auigg_ex=1
ENDIF
ENDIF
IF autao_ex=0
i$=pfad$+l$(0) !URTEILE + LINIEN 1.SATZ
c$=pfad$+l$(1)
t$=pfad$+l$(2)
FOR f=0 TO 2
IF EXIST(pfad$+l$(f))=0
canc$=l$(f)
qui=1
ENDIF
NEXT f
IF qui=0
urt1%=@mal(32000)
lin1%=@mal(64000)
oget(i$,urt1%)
oget(c$,lin1%)
oget(t$,lin1%+32000)
ENDIF
ENDIF
CLR h$
texte$=SPACE$(32000)
IF auigg_ex=0 AND qui=0 AND l$(5)<>"" AND l$(6)<>""
t$=pfad$+l$(5) !TAO-DATEIEN
c$=pfad$+l$(6)
IF EXIST(t$)=0 OR EXIST(c$)=0 OR @fre<120000
IF autao_ex=1
canc$=t$+"?|"+c$+"?"
qui=1
ENDIF
nixtao=1
ELSE
tao%=@mal(64000)
oget(t$,tao%)
oget(c$,tao%+32000)
ENDIF
ELSE
nixtao=1
ENDIF
IF autao_ex=0 AND auigg_ex=0 AND qui=0
IF l$(4)<>""
i$=pfad$+l$(4) !INFO-DATEI
IF EXIST(i$)=0 OR @fre<70000
nixinfo=1
ELSE
inf%=@mal(12000)
oget(i$,inf%)
~EVNT_TIMER(230)
bmov(inf%,12) !INFO-SEITENANFANG ERMITTELN
t(0)=1
FOR f=1 TO 6
t(f)=INSTR(texte$,"*"+STR$(f))
NEXT f
ENDIF
ELSE
nixinfo=1
ENDIF
IF l$(3)<>""
c$=pfad$+l$(3) !URTEILE 2.SATZ
IF EXIST(c$)=0 OR @fre<90000
nixtxt2=1
ELSE
urt2%=@mal(32000)
oget(c$,urt2%)
ENDIF
ELSE
nixtxt2=1
ENDIF
IF l$(7)<>"" AND l$(8)<>""
i$=pfad$+l$(7) !LINIEN 2.SATZ
c$=pfad$+l$(8)
IF EXIST(c$)=0 OR EXIST(i$)=0 OR @fre<120000
nixlin2=1
ELSE
lin2%=@mal(64000)
oget(i$,lin2%)
oget(c$,lin2%+32000)
ENDIF
ELSE
nixlin2=1
ENDIF
i$=pfad$+"GPL.TXT"
c$=pfad$+"GPL_DE.TXT"
IF EXIST(c$)=0 OR EXIST(i$)=0 OR @fre<110000
nixgpl=1
ELSE
gpl_de%=@mal(26000) !GPL-DATEIEN
gpl_en%=@mal(26000)
oget(i$,gpl_en%)
oget(c$,gpl_de%)
ENDIF
ENDIF
RETURN
> PROCEDURE oget(nam$,o%) !FILE LADEN
OPEN "I",#1,nam$
BGET #1,o%,LOF(#1)
CLOSE #1
RETURN
> PROCEDURE inr(r,s) !STRINGS AUS IGINGSTR.DAT LESEN
FOR f=0 TO s
FOR i=0 TO 4
v=INSTR(w,h$,CHR$(44))
j=f*5+i
IF r=0
l$(j)=MID$(h$,w,v-w)
IF j>2 AND LEFT$(l$(j),1)="-"
l$(j)=""
ENDIF
ELSE IF r=1
t$(j)=MID$(h$,w,v-w)
ELSE
r$(j)=MID$(h$,w,v-w)
ENDIF
w=v+1
NEXT i
ADD w,2
NEXT f
ADD w,2
RETURN
> PROCEDURE vars !VARIABLEN,MENU INITIALISIEREN
evnt_ad%=V:a(0) !EVENT-BUFFER
ABSOLUTE m1,evnt_ad% !EVENT-VARIABLEN
ABSOLUTE m4,evnt_ad%+6
ABSOLUTE m5,evnt_ad%+8
ABSOLUTE m6,evnt_ad%+10
ABSOLUTE m7,evnt_ad%+12
ABSOLUTE m8,evnt_ad%+14
' MINI-YINYANG IM ICONFENSTER
yiya$=MKI$(61471)+MKI$(57583)+MKI$(49655)+MKI$(33787)+MKI$(925)+MKI$(925)+MKI$(509)+MKI$(254)+MKI$(125)+MKI$(3133)+MKI$(3133)+MKI$(32827)+MKI$(49271)+MKI$(57583)+MKI$(61471)+MKI$(65279)
'
CLR wi_ti,mini,icon,task,l%,act_ev,again,e_gp,info,sgpl
CLR wanco,wand7,icount,auex,linco,hex_y,hex,nam$,nam1$,key,mcl,oco
'
urteil%=urt1%
line%=lin1%
text2=34
tao=1
men_h=19 !MENÜHÖHE
~VQT_EXTENT(igg$,fx,fy,fv,fw,bx,by,bv,bw)
IF by-fy<10 AND (bitpl=4 OR bitpl=2)
men_h=11
ENDIF
FOR f=0 TO 9
READ wind(f)
NEXT f
wind(1)=men_h
wind(7)=scr_ho-140
scr_co=0
txt_co=1
FOR f=2 TO 15
co(f)=f
NEXT f
FOR f=8 TO 14
READ c
VSETCOLOR f,c
NEXT f
IF back=1
SWAP co(8),co(9)
ENDIF
~GRAF_MOUSE(0,0)
start=1
mncha(0) !MENÜ EINRICHTEN
w1=WIND_CREATE(&X100000000001111,scr_br,scr_ho,wind(2),wind(3))
w2=WIND_CREATE(&X1001,scr_br,scr_ho,140,140)
awin=w1
opwin !FENSTER ÖFFNEN
start=0
INTIN(0)=0 !TEXTAUSGABE LINKS OBEN => TEXT 0,0 = PRINT AT(1,1)
INTIN(1)=5 ! "
VDISYS 39,2,0 ! "
IF autao=1
IF nixtao=0
taoor
autao=0
ENDIF
ELSE IF auigg=1
task=2
icount=-1
ENDIF
RETURN
'
' DIE HAUPT-PROZEDUREN
> PROCEDURE main
REPEAT
l%=FRE(0)
~EVNT_TIMER(230)
act_ev=EVNT_MULTI(&X10011,2,1,1,0,0,0,0,0,0,0,0,0,0,evnt_ad%,0,x,y,ke,w,key,mcl)
IF auex=1
ade
ENDIF
IF qui=0
IF BTST(act_ev,0)<>0 !TASTATUREINGABE
keyboard
ENDIF
IF BTST(act_ev,1)<>0 AND mini=0 !MAUSEVENT
button
ENDIF
IF BTST(act_ev,4)<>0 !FENSTER- UND MENÜEVENTS
SELECT m1
CASE 10
menu
CASE 20
red(m5,m6,m7,m8,2) !EVENT-REDRAW
CASE 21
~WIND_SET(awin,10,awin,0,0,0) !FENSTER TOPPEN
CASE 22
ade !ENDE
CASE 23
mima !FULLER => BALKEN
CASE 28
wind(0)=m5 !FENSTER BEWEGEN
wind(1)=m6
wmov
CASE 34 !ICONIFIER
icon(34)
CASE 50 !SIG_TERM,SIG_KILL?
auex=1
ade
ENDSELECT
ENDIF
ENDIF
UNTIL qui<>0
RETURN
> PROCEDURE keyboard !TASTATUR-EREIGNISSE
ascii=BYTE(key)
SELECT key
CASE &H3002 !^b
mima
CASE &H1011 !^q
ade
CASE &H1117 !^w
mncha(1)
CASE &H2308 !^h
chaco
CASE &H1709 !^i
icon(0)
DEFAULT
IF mini=0 AND icon=0
SELECT key
CASE &H2F76,&H2F56 !V
form(rsc_ve%)
CASE &H1F73,&H1F53 !S
task=1
bmov(urteil%,32)
red_ne(0)
CASE &H1372,&H1352 !R
IF again=1
as(3)
ENDIF
CASE &H1769,&H1749 !I
IF nixinfo=0
infin
ENDIF
CASE &H1474,&H1454 !T
IF nixtao=0
tao
ENDIF
CASE &H1E61,&H1E41 !A
IF nixtao=0
taoor
ENDIF
CASE &H1177,&H1157,&H157A,&H155A !W,Z
IF task>3
inp_txt(ascii MOD 32 DIV 26)
ENDIF
CASE &H4800,&H5000 !UP,DOWN
IF task>3
inp_txt(-((key/&H100-&H48)/8)+1)
ENDIF
CASE &H2267,&H2247,&H6939,&HA39,&H1C0D,&H720D !G,9,RET
IF task=2 OR task=3
go
ENDIF
CASE &H6B35,&H635,&H246A,&H244A,&H2C79,&H2C59 !J,Y,5
IF task<>2
ARRAYFILL line(),0
ARRAYFILL logli(),0
as(2)
ENDIF
CASE &H326D,&H324D,&H316E,&H314E,&H186F,&H184F,&H1970,&H1950 !M,N,O,P
orcha(ascii MOD 32+23)
CASE &H6D31,&H6E32,&H231,&H332 !1,2
IF nixtxt2=0
txcha(ascii-16)
ENDIF
CASE &H2207 !^G
IF nixgpl=0
gplin
ENDIF
CASE &H250B !^K
kan
CASE &H260C !^L
logch
CASE &H1F13 !^S
osave
CASE &H7700 !^CLRH
red_ne(2)
ENDSELECT
ENDIF
ENDSELECT
RETURN
> PROCEDURE button !MAUS-EREIGNISSE
SUB x,@offs_x
SUB y,@offs_y
IF icon=1
IF x>0 AND x<72 AND y>0 AND y<52 AND mcl=2
icon(1)
ENDIF
ELSE
IF task=2 OR task=3
go
ELSE IF task>3
IF y>0 AND y<419 AND x>0 AND x<637
inp_txt(-(x DIV 320)+1)
ENDIF
ENDIF
ENDIF
RETURN
> PROCEDURE menu !MENUE-EREIGNISSE
~MENU_TNORMAL(rsc_me%,m4,1)
SELECT m5
CASE 25
ade
CASE 41
mima
CASE 42
icon(0)
CASE 44
mncha(1)
CASE 45
chaco
DEFAULT
IF mini=0 AND icon=0
SELECT m5
CASE 11
form(rsc_ve%)
CASE 20
task=1
bmov(urteil%,32)
red_ne(0)
CASE 21
as(3)
CASE 23
osave
CASE 27
infin
CASE 28
gplin
CASE 30
tao
CASE 31
taoor
CASE 33,34
txcha(m5)
CASE 36,37,38,39
orcha(m5)
CASE 46
kan
CASE 47
logch
ENDSELECT
ENDIF
ENDSELECT
RETURN
'
' SYSTEM-PROZEDUREN
> PROCEDURE ade !ENDE
IF auex=0
form(rsc_en%)
ENDIF
IF ro=2 OR auex=1
~EVNT_TIMER(140)
~WIND_CLOSE(awin)
~WIND_DELETE(w2)
~WIND_DELETE(w1)
~MENU_BAR(rsc_me%,0)
IF gpl_de%>0
~MFREE(gpl_de%)
~MFREE(gpl_en%)
ENDIF
IF lin2%>0
~MFREE(lin2%)
ENDIF
IF urt2%>0
~MFREE(urt2%)
ENDIF
IF inf%>0
~MFREE(inf%)
ENDIF
IF tao%>0
~MFREE(tao%)
ENDIF
IF lin1%>0
~MFREE(lin1%)
ENDIF
IF urt1%>0
~MFREE(urt1%)
ENDIF
~RSRC_FREE()
qui=1
ENDIF
RETURN
> PROCEDURE f !ERROR
DEFTEXT txt_co,,,13
TEXT 512,353,t$(25)+" "+STR$(ERR)
w0
ON ERROR GOSUB f
RESUME f
RETURN
> PROCEDURE arb !ARBEITSBEREICH
arb_br=wind(2)-2
arb_ho=wind(3)-wi_ti-1
RETURN
> PROCEDURE mima !BALKEN
IF icon=0
SWAP wind(2),wind(4)
SWAP wind(3),wind(5)
mini=-mini+1
wmov
ENDIF
RETURN
> PROCEDURE icon(icn) !ICON
IF mini=0
~WIND_CLOSE(awin)
IF icon=0
IF icn<34
~GRAF_SHRINKBOX(wind(6),wind(7),wind(8),wind(9),wind(0),wind(1),wind(2),wind(3))
ENDIF
awin=w2
ELSE
~GRAF_GROWBOX(wind(0),wind(1),wind(2),wind(3),wind(6),wind(7),wind(8),wind(9))
awin=w1
ENDIF
SWAP wind(0),wind(6)
SWAP wind(1),wind(7)
SWAP wind(2),wind(8)
SWAP wind(3),wind(9)
IF icn=34 AND icon=0
wind(0)=m5
wind(1)=m6
wind(2)=m7
wind(3)=m8
ENDIF
arb
icon=-icon+1
opwin
ENDIF
RETURN
> PROCEDURE ttl !FENSTERTITEL
IF icon=1
j$="I GING"
IF logo=1
j$="I CHING"
ENDIF
i$=j$+CHR$(0)+CHR$(0)
ELSE
i$=t$(0)+CHR$(0)+CHR$(0)
ENDIF
s%=V:i$
~WIND_SET(awin,2,INT(SWAP(s%)),INT(s%),0,0)
RETURN
> PROCEDURE opwin !FENSTER ÖFFNEN
ttl
~WIND_OPEN(awin,wind(0),wind(1),wind(2),wind(3))
IF start=1
~WIND_GET(awin,4,wx,by,wb,wh)
~WIND_GET(awin,5,wx,wy,wb,wh)
wi_ti=by-wy
arb
IF wi_ti<>19
wind(3)=421+wi_ti
arb
wmov
ENDIF
ENDIF
clp
RETURN
> PROCEDURE wmov !FENSTER BEWEGEN
~WIND_SET(awin,5,wind(0),wind(1),wind(2),wind(3))
ttl
clp
RETURN
> PROCEDURE clp !FENSTERCLIPPING
CLIP MAX(0,@offs_x),MAX(0,@offs_y),MIN(arb_br,@b),MIN(arb_ho,@h) OFFSET @offs_x,@offs_y
RETURN
'
' PROGRAMM-PROZEDUREN
> PROCEDURE bmov(m%,m) !TEXT IN TEXTBUFER
BMOVE m%,V:texte$,m*1000
RETURN
> PROCEDURE inp_txt(fv) !TEXTSEITEN BLÄTTERN
w1
GRAPHMODE 2
IF fv=1
box3(co(9),co(8),1,231,394,320,420)
TEXT 245,399,t$(35)
ELSE
box3(co(9),co(8),1,321,394,410,420)
TEXT 333,399,t$(32)
ENDIF
GRAPHMODE 1
~EVNT_TIMER(707)
w0
IF task=4
info=(info+fv*4) MOD 6+1
ELSE IF task=5
tao=(tao+fv*79) MOD 81+1
ELSE
sgpl=(sgpl+fv*(e_gp-2)) MOD e_gp+1
ENDIF
red_ne(0)
RETURN
> PROCEDURE as(f) !START IGING
task=f
~MENU_IENABLE(rsc_me%,21,0)
~MENU_IENABLE(rsc_me%,23,0)
CLR wanco,wand7,again
icount=-1
red_ne(0)
RETURN
> PROCEDURE go !WEITER IGING
IF icount<10
w1
GRAPHMODE 2
box3(co(9),co(8),1,492,394,638,420)
TEXT 511,399,t$(26)+"/[G]/[9]"
~EVNT_TIMER(707)
box3(co(9),1,co(8),491,393,637,419)
TEXT 510,398,t$(26)+"/[G]/[9]"
GRAPHMODE 1
w0
ENDIF
INC icount
red_ne(0)
RETURN
> PROCEDURE infin !START INFO
task=4
info=1
bmov(inf%,12)
red_ne(0)
RETURN
> PROCEDURE tao !START TAO
IF tao<42
bmov(tao%,32)
ELSE
bmov(tao%+32000,32)
ENDIF
task=5
IF autao=0
red_ne(0)
ENDIF
RETURN
> PROCEDURE taoor !TAO-ORAKEL
c=0
FOR f=1 TO 5
c=c+RANDOM(81)+1
NEXT f
tao=(c-1) MOD 81+1
tao
RETURN
> PROCEDURE gplin !START GPL
task=6
sgpl=1
bmov(gpl%,26)
red_ne(0)
RETURN
> PROCEDURE osave !ORAKEL SPEICHERN
IF again=1
INC oco
hex=line(13)
istt
w=INSTR(v,texte$,STR$(hex+2))
j$=CHR$(13)+CHR$(10)
h$=t$(36)+" "+datum$+" "+zeit$+j$+j$+nam1$+j$+j$+MID$(texte$,v+1,w-v-1)+j$
bmov(line%+(hex DIV 32)*32000,32)
s=0
FOR f=1 TO 6
c=line(f+6)
IF c=6 OR c=9
IF f=6
h$=h$+t$(10)+STR$(c)+t$(14)+j$
ELSE IF f=1
h$=h$+t$(11)+STR$(c)+t$(14)+j$
ELSE
h$=h$+STR$(c)+t$(12)+STR$(f)+t$(13)+t$(14)+j$
ENDIF
r=hex*6+f
w=INSTR(texte$,STR$(r))+3
v=INSTR(w,texte$,STR$(r+1))
h$=h$+MID$(texte$,w,v-w)
INC s
ENDIF
NEXT f
IF s>0
hex=line(14)
istt
w=INSTR(v,texte$,STR$(hex+2))
h$=h$+j$+t$(6)+j$+j$+nam$+j$+MID$(texte$,v+1,w-v-1)
ELSE
h$=h$+t$(7)+j$
ENDIF
h$=h$+j$+"<eof>"+j$
c$="I"+LEFT$(datum$,2)+MID$(datum$,4,2)+RIGHT$(datum$,2)+CHR$(oco+64)+".TXT"
IF osa$=""
osa$=pfad$
IF EXIST(pfad$+"ORAKEL\*.*")<>0
osa$=osa$+"ORAKEL\"
ENDIF
ENDIF
ttl
f$=@fsel$(t$(37),osa$+"*.TXT",c$)
ttl
IF f$<>""
OPEN "O",#2,f$
BPUT #2,V:h$,LEN(h$)
CLOSE #2
ENDIF
CLR j$,c$,h$,a$,f$
ENDIF
RETURN
> FUNCTION fsel$(a$,f$,c$) !FILESELECT1
IF INT{ADD({ADD(GB,4)},0)}<&H140
ro=FSEL_INPUT(f$,c$,f)
ELSE
ro=@fsel_ex(a$,f$,c$,f)
ENDIF
IF f=0 OR ro=0 OR c$=""
RETURN ""
ENDIF
FOR r=0 TO 9
EXIT IF MID$(f$,LEN(f$)-r,1)="\"
NEXT r
osa$=LEFT$(f$,LEN(f$)-r)
RETURN osa$+c$
ENDFUNC
> FUNCTION fsel_ex(a$,VAR f$,c$,f) !FILESELECT2
a$=a$+CHR$(0)
f$=f$+CHR$(0)+SPACE$(400)
c$=c$+CHR$(0)+SPACE$(150)
GCONTRL(0)=91
GCONTRL(1)=0
GCONTRL(2)=2
GCONTRL(3)=3
GCONTRL(4)=0
ADDRIN(0)=V:f$
ADDRIN(1)=V:c$
ADDRIN(2)=V:a$
GEMSYS
f$=CHAR{V:f$}
c$=CHAR{V:c$}
f=GINTOUT(1)
RETURN GINTOUT(0)
ENDFUNC
'
' DIE REDRAW-PROZEDUREN
> PROCEDURE red_ne(z) !PROGRAMM-REDRAW
red(@offs_x,@offs_y,arb_br,arb_ho,z)
RETURN
> PROCEDURE red(rx,ry,rb,rh,evnt) !REDRAW
ttl
IF mini=0
w1
~WIND_GET(awin,11,wx,wy,wb,wh)
WHILE wb+wh<>0
wb=wx+wb
wh=wy+wh
wx=MAX(wx,rx)
wy=MAX(wy,ry)
wb=MIN(wb,rx+rb)-wx
wh=MIN(wh,ry+rh)-wy
IF wb>0 AND wh>0
IF RC_INTERSECT(rx,ry,rb,rh,wx,wy,wb,wh)
CLIP wx,wy,MIN(wb,@b),MIN(wh,@h) OFFSET @offs_x,@offs_y
IF icon=0
ON task+1 GOSUB tibi,start,iging,iging,info,taote,gpl
ELSE
box3(co(9),1,co(8),0,0,arb_br-1,arb_ho-1)
box3(co(9),-co(8),1,6,6,arb_br-7,arb_ho-7)
DEFFILL 1
j%=V:yiya$
FOR y=0 TO 15
o%=CARD{j%+y*2}
FOR x=0 TO 15
IF BTST(o%,-x+15)=0
PBOX x*2+19,y*2+10,x*2+20,y*2+11
ENDIF
NEXT x
NEXT y
ENDIF
ENDIF
ENDIF
~WIND_GET(awin,12,wx,wy,wb,wh)
WEND
w0
~WIND_GET(awin,4,wx,wy,wb,wh)
clp
ENDIF
RETURN
> PROCEDURE tibi !TITELBILD
box3(co(9),1,co(8),0,0,637,419)
box3(co(9),-co(8),1,42,42,595,377)
clbox(1,co(8),43,43,596,376)
box3(co(9),1,co(8),108,50,529,91)
box3(co(9),1,co(8),145,329,492,371)
GRAPHMODE 2
DEFTEXT co(12),,,26
i$=t$(3)+" "+t$(4)
TEXT (400-(LEN(i$)*16)) DIV 2+119,55,i$
DEFTEXT txt_co,,,13
TEXT 155,335,"V 3.3.2 GFA 3.6TT 5/0"
TEXT 420,335,"by ZWYRD"
TEXT 155,351,"Released under GNU General Public License"
GRAPHMODE 1
IF logo=0
logo
ELSE
logo2
ENDIF
RETURN
> PROCEDURE start !STARTSEITE
lard
z=INSTR(1,texte$,"1.")-1
txt(1,2,30,z)
RETURN
> PROCEDURE iging
IF icount<11
IF icount=-1 OR evnt>0
box3(co(9),1,co(8),0,0,637,392)
box3(co(9),1,co(8),0,393,490,419)
box3(co(9),1,co(8),491,393,637,419)
RESTORE t
IF task=3
box3(co(10),-1,co(8),3,123,51,162)
GRAPHMODE 2
DEFTEXT co(9),,,13
TEXT 16,135,"(R)"
GRAPHMODE 1
ENDIF
FOR r=75 TO 472 STEP 397
box3(co(9),-co(8),1,r-20,123,r+110,264)
FOR w=1 TO 2
FOR v=1 TO 8
READ s
DEFFILL txt_co
PBOX r,138+s,r+10,140+s
IF w=1
DEFFILL @bp(co(9))
PBOX r+4,138+s,r+6,140+s
ENDIF
EXIT IF v=4 AND OR(r=75 AND w=2,r=472 AND w=1)
NEXT v
NEXT w
DEFTEXT txt_co,,,13
GRAPHMODE 2
FOR v=1 TO 4
TEXT r+20,97+v*32,t$((r DIV 400)*5+39+v)
TEXT r+20,113+v*32,t$((r DIV 400)*5+49+v)
NEXT v
GRAPHMODE 1
NEXT r
ENDIF
IF icount<>7 OR wand7>0
kern
ELSE
INC icount
ENDIF
IF icount=8
IF wanco>0
INC icount
kern
ELSE
wech
GRAPHMODE 2
TEXT 256,33,t$(7)
GRAPHMODE 1
ADD icount,2
ENDIF
ENDIF
ELSE IF icount=11
lard
GRAPHMODE 2
DEFTEXT co(10),4,,26
TEXT 60,32,t$(15)
TEXT 100,82,t$(16)
DEFTEXT co(11),0
TEXT 100,132,t$(17)
TEXT 90,182,t$(20)
TEXT 80,232,t$(21)
TEXT 51,282,t$(22)
DEFTEXT co(14)
TEXT 240,332,"KALLISTI"
GRAPHMODE 1
~MENU_IENABLE(rsc_me%,21,1)
~MENU_IENABLE(rsc_me%,23,1)
again=1
IF auigg_ex=1
auex=1
ENDIF
ELSE
CLR task
red_ne(0)
ENDIF
RETURN
> PROCEDURE info
txt_in(info)
TEXT 80,398,"INFO"
TEXT 569,5,"FRE:"+STR$(l%)
txt(t(info-1)+2,1,25,t(info))
RETURN
> PROCEDURE taote
IF tao=1 OR tao=41
bmov(tao%,32)
ELSE IF tao=42 OR tao=81
bmov(tao%+32000,32)
ENDIF
txt_in(tao)
TEXT 50,398,t$(30)
TEXT 162,398,t$(31)+" "+STR$(tao)
TEXT 424,398,t$(33)+" "+t$(34)
w=INSTR(texte$,STR$(tao))
v=INSTR(w,texte$,STR$(tao+1))
txt(w,1,25,v)
IF autao_ex=1
auex=1
ENDIF
RETURN
> PROCEDURE gpl
txt_in(sgpl)
TEXT 80,398,"GPL"
CLR f,w
lgpl=1
v=INSTR(texte$,"<eof>")
WHILE f<(sgpl-1)*24
lgpl=INSTR(w,texte$,CHR$(13))
EXIT IF lgpl=0 OR lgpl>v
w=lgpl+2
INC f
WEND
IF lgpl>0
IF lgpl=1
lgpl=0
ELSE
ADD lgpl,2
ENDIF
txt(lgpl,1,24,v)
ENDIF
RETURN
'
' DIE I GING-PROZEDUREN
> PROCEDURE line !LINIENGRAFIK
SELECT line(linco)
CASE 6
box3(co(10),-1,co(8),240,hex_y,294,hex_y+16)
box3(co(10),-1,co(8),344,hex_y,398,hex_y+16)
ellip(co(11),co(8),1,319,hex_y+8,12,9)
CASE 7
box3(txt_co,-co(8),co(9),240,hex_y,398,hex_y+16)
CASE 8
box3(txt_co,-co(8),co(9),240,hex_y,294,hex_y+16)
box3(txt_co,-co(8),co(9),344,hex_y,398,hex_y+16)
CASE 9
box3(co(10),-1,co(8),240,hex_y,398,hex_y+16)
ellip(co(11),co(8),1,319,hex_y+8,12,9)
ENDSELECT
RETURN
> PROCEDURE punkt !DER LAUFENDE PUNKT
GRAPHMODE 2
n=@bp(co(9))
FOR v=240 TO 320 STEP 10
FOR w=co(11) TO n STEP -(co(11)-n)
DEFFILL w
PCIRCLE v,hex_y+8,10
PCIRCLE 640-v,hex_y+8,10
~EVNT_TIMER(23)
NEXT w
NEXT v
GRAPHMODE 1
RETURN
> PROCEDURE wech !LINIENTEXTE LÖSCHEN
IF evnt<2
DEFFILL co(10)
IF EVEN(line(MIN(5,icount-1)))
box3(co(10),-co(8),1,4,4,214,82)
box3(co(10),-co(8),1,425,4,633,82)
ELSE
box3(co(10),-co(8),1,4,4,633,82)
ENDIF
DEFFILL co(11)
ellip(co(11),1,co(8),319,41,37,37)
~EVNT_TIMER(410)
DEFFILL @bp(co(9))
PBOX 4,4,633,82
ENDIF
RETURN
> PROCEDURE alt !ORAKEL STENGEL-A
CLR x,y,n,z
FOR s=0 TO 2
punkt
r=x+y+z
x=RANDOM(47-r)+2
y=49-r-x
DEC x
WHILE y>4
SUB y,4
WEND
WHILE x>4
SUB x,4
WEND
IF s=1
n=1
z=r
ENDIF
IF x+y+n=8
ADD line(linco),2
ELSE
ADD line(linco),3
ENDIF
INC x
NEXT s
RETURN
> PROCEDURE zwy !ORAKEL STENGEL-Z
FOR s=0 TO 2
punkt
r=RANDOM(4)
IF (s=0 AND r<3) OR (s>0 AND r<2)
ADD line(linco),3
ELSE
ADD line(linco),2
ENDIF
NEXT s
RETURN
> PROCEDURE muen !ORAKEL MÜNZEN
punkt
line(linco)=RANDOM(2)+2
ADD line(linco),RANDOM(2)+2
ADD line(linco),RANDOM(2)+2
RETURN
> PROCEDURE ran !ORAKEL EASY
punkt
line(linco)=RANDOM(4)+6
' line(linco)=6
RETURN
> PROCEDURE kern !DAS EIGENTLICHE I GING
IF icount=9
DEFFILL @bp(co(9))
PBOX 3,270,634,387
PBOX 3,83,634,114
wech
GRAPHMODE 2
TEXT 264,33,t$(6)
GRAPHMODE 1
ENDIF
IF task=3 AND (icount=-1 OR icount=9)
INC icount
FOR f=0 TO 5
SWAP line(f),line(f+7)
NEXT f
hex=line(icount DIV 9+13)
DEFFILL @bp(co(9))
PBOX 240,122,398,265
ENDIF
linco=0
FOR hex_y=248 TO 123 STEP -25
IF wanco=0
IF icount=-1
ON orakel GOSUB alt,zwy,muen,ran
line(linco+7)=line(linco)
IF ODD(line(linco))
logli(linco)=2^linco
ELSE
logli(linco)=2^(linco+6)
ENDIF
IF linco=5
INC icount
ENDIF
ENDIF
IF icount<1 OR evnt>0
line
ENDIF
ELSE
IF icount=9
IF line(linco)=6 OR line(linco)=9
punkt
IF line(linco)=6
line(linco)=7
logli(linco)=2^linco
ELSE
line(linco)=8
logli(linco)=2^(linco+6)
ENDIF
line
ENDIF
IF linco=5
INC icount
ENDIF
ELSE
IF evnt>0 OR task=3
line
ENDIF
ENDIF
ENDIF
INC linco
NEXT hex_y
IF (icount=0 OR icount=10) AND task=2
RESTORE m
FOR hex=0 TO 63
READ f
EXIT IF f=logli(1)+logli(2)+logli(3)+logli(4)+logli(5)+logli(0)
NEXT hex
line(icount DIV 9+13)=hex
ENDIF
IF icount=0 OR icount=10 OR evnt>0
istt
nam$=MID$(texte$,w,v-w-2)
IF icount=0
nam1$=nam$
datum$=DATE$
zeit$=TIME$
ENDIF
GRAPHMODE 2
DEFTEXT co(14),,,26
TEXT (608-(v-w-2)*15)/2,83,nam$
GRAPHMODE 1
DEFTEXT txt_co,,,13
w=INSTR(v,texte$,STR$(hex+2))
txt(v+1,18,25,w)
ENDIF
IF icount>0 AND icount<8
WHILE line(icount-1)=8 OR line(icount-1)=7
INC icount
WEND
IF line(icount-1)=9 OR line(icount-1)=6
wech
bmov(line%+(hex DIV 32)*32000,32)
INC wanco
GRAPHMODE 2
IF icount=6
TEXT 216,3,t$(10)+STR$(line(icount-1))+t$(14)
ELSE IF icount=1
TEXT 216,3,t$(11)+STR$(line(icount-1))+t$(14)
ELSE
TEXT 216,3,STR$(line(icount-1))+t$(12)+STR$(icount)+t$(13)+t$(14)
ENDIF
GRAPHMODE 2
r=hex*6+icount
w=INSTR(texte$,STR$(r))+3
v=INSTR(w,texte$,STR$(r+1))
txt(w,2,6,v)
IF AND(r=6 OR r=12,wanco=6)
wand7=r
ENDIF
ENDIF
IF icount=7
IF wand7>5
wech
bmov(line%,32)
w=INSTR(texte$,STR$(wand7+200))+3
v=INSTR(w,texte$,STR$(wand7+201))
txt(w,2,6,v)
wand7=0
ELSE
INC icount
ENDIF
ENDIF
ENDIF
IF icount=0 OR evnt>0
GRAPHMODE 2
TEXT 10,398,nam1$
wco=0
IF icount>9
wco=7
ENDIF
FOR f=0 TO 5
EXIT IF line(f+wco)=6 OR line(f+wco)=9
NEXT f
IF f=6
TEXT 350,398,t$(7)
ELSE
TEXT 350,398,"~ ~"
FOR f=0 TO 5
IF line(f+wco)=6 OR line(f+wco)=9
TEXT 366+f*16,398,f+1
ENDIF
NEXT f
ENDIF
TEXT 510,398,t$(26)+"/[G]/[9]"
GRAPHMODE 1
ENDIF
RETURN
> PROCEDURE istt !ZEICHENSUCHE
bmov(urteil%,32)
z=INSTR(1,texte$,"1.")-1
w=INSTR(z,texte$,STR$(hex+1))
v=INSTR(w+2,texte$,"0")
RETURN
'
' GRAFIK-PROZEDUREN
> FUNCTION bp(n) ! S/W-box?
IF bitpl=1 AND (n=co(8) OR n=co(9))
RETURN 0
ENDIF
RETURN n
ENDFUNC
> FUNCTION lp(n) ! S/W-line?
IF bitpl=1
RETURN 1
ENDIF
RETURN n
ENDFUNC
> PROCEDURE box3(b1,b2,b3,bx,by,bv,bw)
DEFFILL @bp(b1)
IF b2<0
PBOX bx+2,by+2,bv-2,bw-2
ELSE
PBOX bx,by,bv,bw
ENDIF
clbox(b3,ABS(b2),bx,by,bv,bw)
RETURN
> PROCEDURE clbox(b3,b2,bx,by,bv,bw)
COLOR @lp(b3)
DRAW bx+2,bw-3 TO bx+2,bw-4 TO bx+1,bw-4 TO bx+1,by+4 TO bx+2,by+4 TO bx+2,by+2
DRAW TO bx+4,by+2 TO bx+4,by+1 TO bv-4,by+1 TO bv-4,by+2 TO bv-3,by+2
COLOR @lp(b2)
DRAW bx+3,bw-2 TO bx+4,bw-2 TO bx+4,bw-1 TO bv-4,bw-1 TO bv-4,bw-2 TO bv-2,bw-2
DRAW TO bv-2,bw-4 TO bv-1,bw-4 TO bv-1,by+4 TO bv-2,by+4 TO bv-2,by+3
RETURN
> PROCEDURE ellip(b1,b2,b3,bx,by,bv,bw)
DEFFILL b1
PELLIPSE bx,by,bv-1,bw-1
COLOR b2
ELLIPSE bx,by,bv,bw,450,2250
COLOR b3
ELLIPSE bx,by,bv,bw,2250,450
RETURN
> PROCEDURE logo2 !TITELBILD - I Ching
ellip(co(14),co(8),1,352,135,13,10)
' I
box3(co(10),-1,co(8),69,109,100,261)
' C
box3(co(10),-1,co(8),141,109,173,261)
box3(co(10),-1,co(8),166,109,228,141)
PBOX 166,111,171,141
box3(co(10),-1,co(8),166,224,228,261)
PBOX 166,224,171,259
' h
box3(co(10),-1,co(8),236,109,268,261)
box3(co(10),-1,co(8),266,159,304,191)
PBOX 266,165,268,188
box3(co(10),-1,co(8),296,159,328,261)
PBOX 296,161,300,189
' i
box3(co(10),-1,co(8),336,159,368,261)
' n
box3(co(10),-1,co(8),376,159,408,261)
box3(co(10),-1,co(8),406,159,444,191)
PBOX 406,165,408,188
box3(co(10),-1,co(8),436,159,468,261)
PBOX 436,161,440,189
' g
box3(co(10),-1,co(8),476,159,568,261)
box3(co(9),-co(8),1,506,189,538,226)
box3(co(10),-1,co(8),69,289,568,321)
box3(co(10),-1,co(8),536,254,568,296)
PBOX 536,253,566,259
PBOX 536,291,566,297
RETURN
> PROCEDURE logo !TITELBILD
ellip(co(14),co(8),1,315,135,13,10)
' I
box3(co(10),-1,co(8),86,109,117,261)
'
' G
box3(co(10),-1,co(8),189,109,221,261)
box3(co(10),-1,co(8),214,109,266,141)
PBOX 214,111,219,141
box3(co(10),-1,co(8),214,224,281,261)
PBOX 214,224,219,259
box3(co(10),-1,co(8),249,179,281,231)
PBOX 249,226,279,232
box3(co(10),-1,co(8),239,179,256,211)
PBOX 251,181,256,212
' i
box3(co(10),-1,co(8),299,159,331,261)
' n
box3(co(10),-1,co(8),349,159,381,261)
box3(co(10),-1,co(8),379,159,417,191)
PBOX 379,165,381,188
box3(co(10),-1,co(8),409,159,441,261)
PBOX 409,161,413,189
' g
box3(co(10),-1,co(8),459,159,551,261)
box3(co(9),-co(8),1,489,189,521,226)
box3(co(10),-1,co(8),86,289,551,321)
box3(co(10),-1,co(8),519,254,551,296)
PBOX 519,253,549,259
PBOX 519,291,549,297
RETURN
> PROCEDURE lard !EIN WENIG KITSCH
box3(co(9),1,co(8),0,0,637,419)
DEFFILL ,2,5
box3(1,-co(8),1,6,8,36,411)
box3(1,-co(8),1,601,8,631,411)
DEFFILL ,1,0
box3(co(9),-co(8),1,46,8,591,411)
RETURN
> PROCEDURE txt_in(fx) !GRAFIK DER TEXTSEITEN
box3(co(9),1,co(8),0,0,637,392)
DEFTEXT txt_co,,,26
GRAPHMODE 2
TEXT 590,20,fx
box3(co(9),1,co(8),230,393,319,419)
box3(co(9),1,co(8),320,393,409,419)
DEFTEXT ,,,13
TEXT 244,398,t$(35)
TEXT 332,398,t$(32)
box3(co(9),1,co(8),0,393,229,419)
box3(co(9),1,co(8),410,393,637,419)
RETURN
> PROCEDURE txt(d,x,y,n) !TEXTAUSGABE
DEFTEXT txt_co,,,13
GRAPHMODE 2
FOR f=x TO y
c=INSTR(d,texte$,CHR$(13))
EXIT IF c=0 OR c>n
TEXT 5,f*16-13,MID$(texte$,d,c-d)
d=c+2
NEXT f
GRAPHMODE 1
RETURN
'
' MEHR SYSTEM-PROZEDUREN
> PROCEDURE txcha(f) !MENU TEXTE ÄNDERN
~MENU_IENABLE(rsc_me%,f,0)
text2=-(f-33)+34
~MENU_IENABLE(rsc_me%,text2,1)
IF f=33
urteil%=urt1%
line%=lin1%
ELSE
urteil%=urt2%
IF nixlin2=0
line%=lin2%
ENDIF
ENDIF
RETURN
> PROCEDURE orcha(f) !MENU ORAKEL ÄNDERN
~MENU_ICHECK(rsc_me%,orakel+35,0)
~MENU_ICHECK(rsc_me%,f,1)
orakel=f-35
RETURN
> PROCEDURE mncha(c) !MENU-SPRACHE TAUSCHEN
IF c=1
~MENU_ICHECK(rsc_me%,orakel+35,0)
~MENU_BAR(rsc_me%,0)
menlan=-menlan+1
ENDIF
IF menlan=0
rsc_me%=men_1%
rsc_ve%=ver_1%
rsc_en%=end_1%
gpl%=gpl_de%
e_gp=19
ELSE
rsc_me%=men_2%
rsc_ve%=ver_2%
rsc_en%=end_2%
gpl%=gpl_en%
e_gp=14
ENDIF
~MENU_BAR(rsc_me%,1)
~MENU_ICHECK(rsc_me%,orakel+35,1)
~MENU_IENABLE(rsc_me%,-(text2-33)+34,0)
IF again=0
~MENU_IENABLE(rsc_me%,21,0)
~MENU_IENABLE(rsc_me%,23,0)
ENDIF
IF nixtao=1
~MENU_IENABLE(rsc_me%,30,0)
~MENU_IENABLE(rsc_me%,31,0)
ENDIF
IF nixinfo=1
~MENU_IENABLE(rsc_me%,27,0)
ENDIF
IF nixtxt2=1
~MENU_IENABLE(rsc_me%,34,0)
ELSE
~MENU_IENABLE(rsc_me%,text2,1)
ENDIF
IF nixgpl=1
~MENU_IENABLE(rsc_me%,28,0)
ENDIF
IF task=6
sgpl=1
bmov(gpl%,26)
ENDIF
IF c=1 OR (start=1 AND menlan=1)
SWAP t$(),r$()
IF c=1
red_ne(1)
ENDIF
ENDIF
RETURN
> PROCEDURE chaco !HINTERGRUND TAUSCHEN
SWAP co(8),co(9)
red_ne(1)
RETURN
> PROCEDURE kan !FARBKANÄLE ROTIEREN
FOR f=2 TO 15
co(f)=(co(f)-1) MOD 14+2
NEXT f
red_ne(1)
RETURN
> PROCEDURE logch !LOGO TAUSCHEN
logo=-logo+1
IF task=0
red_ne(1)
ENDIF
RETURN
> PROCEDURE w1
~WIND_UPDATE(1)
RETURN
> PROCEDURE w0
~WIND_UPDATE(0)
RETURN
> PROCEDURE form(o%) !RSC-FORMULARE
ttl
~FORM_CENTER(o%,fx,fy,fb,fh)
~OBJC_DRAW(o%,0,2,fx,fy,fb,fh)
~FORM_DIAL(0,0,0,0,0,fx,fy,fb,fh)
ro=FORM_DO(o%,0)
~FORM_DIAL(3,0,0,0,0,fx,fy,fb,fh)
~OBJC_CHANGE(o%,ro,0,fx,fy,fb,fh,0,0)
ttl
' button: version=2,ende=3+4
RETURN
> FUNCTION fre !FREIER SPEICHER
IF a_st<>0
RETURN MALLOC(-1)
ENDIF
fb%=GEMDOS(68,L:-1,0)
fm%=GEMDOS(68,L:-1,1)
RETURN MAX(fm%,fb%)
ENDFUNC
> FUNCTION mal(j%) !SPEICHER ALLOZIEREN
IF a_st<>0
RETURN MALLOC(j%)
ENDIF
RETURN GEMDOS(68,L:j%,3)
ENDFUNC